-- GENERATED SPELL FOR [Twilight Marauder] --


function spell0_15542(pUnit, Event) --@Charge,n/a--
pUnit:FullCastSpellOnTarget(22911,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15542', 2343, 1)
end

function spell1_15542(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(8599,pUnit)
pUnit:RegisterEvent('Sorts_15542', 510, 1)
end

function spell2_15542(pUnit, Event) --@Piercing Howl,Self--
pUnit:FullCastSpellOnTarget(23600,pUnit)
pUnit:RegisterEvent('Sorts_15542', 6300, 1)
end

function Sorts_15542(pUnit, Event)
local choix_sorts_15542 = math.random(0, 2)
if choix_sorts_15542 == 0 then
pUnit:RegisterEvent('spell0_15542', 1, 1)
end
if choix_sorts_15542 == 1 then
pUnit:RegisterEvent('spell1_15542', 1, 1)
end
if choix_sorts_15542 == 2 then
pUnit:RegisterEvent('spell2_15542', 1, 1)
end
end

function mob15542_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_15542', math.random(1500, 3000), 1)
end

function mob15542_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15542_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15542_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(15542, 1, 'mob15542_Action')
RegisterUnitEvent(15542, 2, 'mob15542_Leave')
RegisterUnitEvent(15542, 3, 'mob15542_Kill')
RegisterUnitEvent(15542, 4, 'mob15542_Die')
